import requests
from util.fontjm import make_font_maps


res = requests.get("https://www.shixiseng.com/app/interns/search/v2?build_time=1763382736866&page=1&type=intern&keyword=%E8%BF%90%E8%90%A5&area=&months=&days=&degree=&official=&enterprise=&salary=-0&publishTime=&sortType=&city=%E5%85%A8%E5%9B%BD&internExtend=",headers=
{
'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36'
})

items = res.json()['msg']['data']



font_maps = make_font_maps('./static/font/file')


def get_font(value):
    result = ''
    value = value.split('&')[1:]
    for i in value:
        s = i.replace('#','0')
        result += font_maps[s]
    return result



for item in items:
    print(item['cname'],get_font(item['maxsal']),get_font(item['minsal']))